package cn.iocoder.yudao.module.system.controller.admin.teacherdashboard.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Schema(description = "管理后台 - 教师看板数据 Response VO")
@Data
public class TeacherDashboardRespVO {

    @Schema(description = "班级基本信息")
    private ClassBasicInfo classInfo;

    @Schema(description = "最新考试概况")
    private LatestExamOverview latestExam;

    @Schema(description = "成绩统计分析")
    private ScoreStatistics scoreStatistics;

    @Schema(description = "升学分析")
    private AdmissionAnalysis admissionAnalysis;

    @Schema(description = "学生排名信息")
    private StudentRankingInfo studentRanking;

    @Schema(description = "对比分析")
    private ComparisonAnalysis comparison;

    @Schema(description = "重点关注学生")
    private List<FocusStudent> focusStudents;

    @Schema(description = "教学建议")
    private List<TeachingSuggestion> teachingSuggestions;

    @Schema(description = "学生目标汇总")
    private StudentGoalSummary studentGoalSummary;

    @Schema(description = "目标指标分析")
    private GoalIndicatorAnalysis goalIndicatorAnalysis;

    /**
     * 班级基本信息
     */
    @Data
    public static class ClassBasicInfo {
        @Schema(description = "班级ID", example = "1")
        private Long classId;

        @Schema(description = "班级名称", example = "高三(1)班")
        private String className;

        @Schema(description = "年级", example = "高三")
        private String grade;

        @Schema(description = "学生总数", example = "45")
        private Integer totalStudents;

        @Schema(description = "班主任姓名", example = "张老师")
        private String teacherName;

        @Schema(description = "班级类型", example = "理科重点班")
        private String classType;

        @Schema(description = "班级目标", example = "一本上线率80%")
        private String classTarget;
        
        @Schema(description = "省份", example = "安徽")
        private String province;
    }

    /**
     * 最新考试概况
     */
    @Data
    public static class LatestExamOverview {
        @Schema(description = "考试ID", example = "1")
        private Long examId;

        @Schema(description = "考试名称", example = "2024年高三上学期期中考试")
        private String examName;

        @Schema(description = "考试时间", example = "2024-01-15T08:30:00")
        private LocalDateTime examDate;

        @Schema(description = "参考人数", example = "44")
        private Integer participantCount;

        @Schema(description = "缺考人数", example = "1")
        private Integer absentCount;

        @Schema(description = "班级平均分", example = "620.5")
        private BigDecimal classAvgScore;

        @Schema(description = "班级最高分", example = "684.5")
        private BigDecimal classMaxScore;

        @Schema(description = "班级最低分", example = "520.0")
        private BigDecimal classMinScore;

        @Schema(description = "年级平均分", example = "580.5")
        private BigDecimal gradeAvgScore;

        @Schema(description = "班级在年级中的排名", example = "2")
        private Integer classRankInGrade;

        @Schema(description = "年级班级总数", example = "8")
        private Integer totalClassesInGrade;
        
        @Schema(description = "班级平均赋分", example = "625.0")
        private BigDecimal classAvgScoreAssigned;
        
        @Schema(description = "班级最高赋分", example = "690.0")
        private BigDecimal classMaxScoreAssigned;
        
        @Schema(description = "主要选科组合分布")
        private Map<String, Integer> subjectCombinationDistribution;
        
        @Schema(description = "考试类型分布")
        private Map<String, Integer> examTypeDistribution;
    }

    /**
     * 成绩统计分析
     */
    @Data
    public static class ScoreStatistics {
        @Schema(description = "总分统计")
        private TotalScoreStats totalScore;

        @Schema(description = "各科成绩统计")
        private Map<String, SubjectScoreStats> subjectScores;

        @Schema(description = "分数段分布")
        private List<ScoreRangeDistribution> scoreDistribution;

        @Schema(description = "及格率统计")
        private PassRateStats passRate;
    }

    /**
     * 总分统计
     */
    @Data
    public static class TotalScoreStats {
        @Schema(description = "平均分", example = "620.5")
        private BigDecimal avgScore;

        @Schema(description = "最高分", example = "684.5")
        private BigDecimal maxScore;

        @Schema(description = "最低分", example = "520.0")
        private BigDecimal minScore;

        @Schema(description = "标准差", example = "45.2")
        private BigDecimal standardDeviation;

        @Schema(description = "与年级平均分差值", example = "40.0")
        private BigDecimal gradeAvgDiff;

        @Schema(description = "在年级中的排名", example = "2")
        private Integer gradeRank;
    }

    /**
     * 科目成绩统计
     */
    @Data
    public static class SubjectScoreStats {
        @Schema(description = "科目名称", example = "数学")
        private String subjectName;

        @Schema(description = "平均分", example = "128.5")
        private BigDecimal avgScore;

        @Schema(description = "最高分", example = "150.0")
        private BigDecimal maxScore;

        @Schema(description = "最低分", example = "85.0")
        private BigDecimal minScore;

        @Schema(description = "满分", example = "150.0")
        private BigDecimal fullScore;

        @Schema(description = "及格率", example = "95.6")
        private BigDecimal passRate;

        @Schema(description = "优秀率", example = "68.9")
        private BigDecimal excellentRate;

        @Schema(description = "与年级平均分差值", example = "8.5")
        private BigDecimal gradeAvgDiff;

        @Schema(description = "在年级中的排名", example = "1")
        private Integer gradeRank;
    }

    /**
     * 分数段分布
     */
    @Data
    public static class ScoreRangeDistribution {
        @Schema(description = "分数段", example = "650-700")
        private String scoreRange;

        @Schema(description = "人数", example = "12")
        private Integer count;

        @Schema(description = "占比", example = "26.7")
        private BigDecimal percentage;

        @Schema(description = "等级", example = "优秀")
        private String level;
    }

    /**
     * 及格率统计
     */
    @Data
    public static class PassRateStats {
        @Schema(description = "总体及格率", example = "93.3")
        private BigDecimal overallPassRate;

        @Schema(description = "优秀率", example = "66.7")
        private BigDecimal excellentRate;

        @Schema(description = "良好率", example = "24.4")
        private BigDecimal goodRate;

        @Schema(description = "不及格率", example = "6.7")
        private BigDecimal failRate;

        @Schema(description = "各科及格率")
        private Map<String, BigDecimal> subjectPassRates;
    }

    /**
     * 升学分析
     */
    @Data
    public static class AdmissionAnalysis {
        @Schema(description = "升学预测统计")
        private AdmissionPredictionStats predictionStats;

        @Schema(description = "目标达成情况")
        private TargetAchievementInfo targetAchievement;

        @Schema(description = "临界学生分析")
        private CriticalStudentAnalysis criticalStudents;

        @Schema(description = "升学趋势分析")
        private AdmissionTrendAnalysis trendAnalysis;
    }

    /**
     * 升学预测统计
     */
    @Data
    public static class AdmissionPredictionStats {
        @Schema(description = "985院校预测上线人数", example = "8")
        private Integer predicted985Count;

        @Schema(description = "985院校预测上线率", example = "17.8")
        private BigDecimal predicted985Rate;

        @Schema(description = "985院校预测上线学生列表")
        private List<AdmissionStudentInfo> predicted985Students;

        @Schema(description = "211院校预测上线人数", example = "15")
        private Integer predicted211Count;

        @Schema(description = "211院校预测上线率", example = "33.3")
        private BigDecimal predicted211Rate;

        @Schema(description = "211院校预测上线学生列表")
        private List<AdmissionStudentInfo> predicted211Students;

        @Schema(description = "双一流院校预测上线人数", example = "18")
        private Integer predictedDoubleFirstClassCount;

        @Schema(description = "双一流院校预测上线率", example = "40.0")
        private BigDecimal predictedDoubleFirstClassRate;

        @Schema(description = "双一流院校预测上线学生列表")
        private List<AdmissionStudentInfo> predictedDoubleFirstClassStudents;

        @Schema(description = "特控线预测上线人数", example = "35")
        private Integer predictedSpecialControlCount;

        @Schema(description = "特控线预测上线率", example = "77.8")
        private BigDecimal predictedSpecialControlRate;

        @Schema(description = "特控线预测上线学生列表")
        private List<AdmissionStudentInfo> predictedSpecialControlStudents;

        @Schema(description = "本科线预测上线人数", example = "42")
        private Integer predictedUndergraduateCount;

        @Schema(description = "本科线预测上线率", example = "93.3")
        private BigDecimal predictedUndergraduateRate;

        @Schema(description = "本科线预测上线学生列表")
        private List<AdmissionStudentInfo> predictedUndergraduateStudents;

        @Schema(description = "专科线预测上线人数", example = "44")
        private Integer predictedSpecialtyCount;

        @Schema(description = "专科线预测上线率", example = "97.8")
        private BigDecimal predictedSpecialtyRate;

        @Schema(description = "专科线预测上线学生列表")
        private List<AdmissionStudentInfo> predictedSpecialtyStudents;

        @Schema(description = "未达线人数", example = "1")
        private Integer belowLineCount;

        @Schema(description = "未达线率", example = "2.2")
        private BigDecimal belowLineRate;

        @Schema(description = "未达线学生列表")
        private List<AdmissionStudentInfo> belowLineStudents;

        // 保留原有字段以兼容旧版本
        @Schema(description = "一本线预测上线人数（已废弃，使用特控线）", example = "35")
        @Deprecated
        private Integer predictedFirstTierCount;

        @Schema(description = "一本线预测上线率（已废弃，使用特控线）", example = "77.8")
        @Deprecated
        private BigDecimal predictedFirstTierRate;

        @Schema(description = "二本线预测上线人数（已废弃，使用本科线）", example = "42")
        @Deprecated
        private Integer predictedSecondTierCount;

        @Schema(description = "二本线预测上线率（已废弃，使用本科线）", example = "93.3")
        @Deprecated
        private BigDecimal predictedSecondTierRate;
    }

    /**
     * 升学预测学生信息
     */
    @Data
    public static class AdmissionStudentInfo {
        @Schema(description = "学生ID", example = "1001")
        private Long studentId;

        @Schema(description = "学生姓名", example = "张三")
        private String studentName;

        @Schema(description = "学号", example = "G3C1001")
        private String studentNo;

        @Schema(description = "班级ID", example = "3")
        private Long classId;

        @Schema(description = "班级名称", example = "高三(1)班")
        private String className;

        @Schema(description = "当前总分", example = "684.5")
        private BigDecimal currentScore;

        @Schema(description = "2025等效位次", example = "1250")
        private Integer equivalentRanking2025;

        @Schema(description = "预测升学层次", example = "985")
        private String predictedAdmissionLevel;

        @Schema(description = "可报考985院校")
        private List<String> eligible985Universities;

        @Schema(description = "可报考211院校")
        private List<String> eligible211Universities;

        @Schema(description = "可报考双一流院校")
        private List<String> eligibleDoubleFirstClassUniversities;

        @Schema(description = "选科组合", example = "物化地")
        private String subjectCombination;

        @Schema(description = "首选科目", example = "物理")
        private String firstSubject;

        @Schema(description = "次选科目", example = "化学,地理")
        private String secondSubject;

        @Schema(description = "考试类型", example = "物理类")
        private String examType;
    }

    /**
     * 目标达成情况
     */
    @Data
    public static class TargetAchievementInfo {
        @Schema(description = "班级目标", example = "一本上线率80%")
        private String classTarget;

        @Schema(description = "目标上线人数", example = "36")
        private Integer targetCount;

        @Schema(description = "当前预测上线人数", example = "35")
        private Integer currentPredictedCount;

        @Schema(description = "目标完成率", example = "97.2")
        private BigDecimal achievementRate;

        @Schema(description = "距离目标差距", example = "1")
        private Integer gapToTarget;

        @Schema(description = "目标达成状态", example = "接近达成")
        private String achievementStatus;
    }

    /**
     * 临界学生分析
     */
    @Data
    public static class CriticalStudentAnalysis {
        @Schema(description = "985临界学生")
        private List<CriticalStudentInfo> critical985Students;

        @Schema(description = "211临界学生")
        private List<CriticalStudentInfo> critical211Students;

        @Schema(description = "一本临界学生")
        private List<CriticalStudentInfo> criticalFirstTierStudents;

        @Schema(description = "二本临界学生")
        private List<CriticalStudentInfo> criticalSecondTierStudents;
    }

    /**
     * 临界学生信息
     */
    @Data
    public static class CriticalStudentInfo {
        @Schema(description = "学生ID", example = "1001")
        private Long studentId;

        @Schema(description = "学生姓名", example = "张三")
        private String studentName;

        @Schema(description = "学号", example = "G3C1001")
        private String studentNo;

        @Schema(description = "当前预估分数", example = "678")
        private BigDecimal currentScore;

        @Schema(description = "目标分数线", example = "680")
        private BigDecimal targetScore;

        @Schema(description = "分数差距", example = "2")
        private BigDecimal scoreDiff;

        @Schema(description = "目标层次", example = "985")
        private String targetLevel;

        @Schema(description = "提升建议", example = "数学需要提升5分")
        private String improvementSuggestion;
        
        @Schema(description = "选科组合", example = "物化生")
        private String subjectCombination;
        
        @Schema(description = "考试类型", example = "物理类")
        private String examType;
        
        @Schema(description = "当前赋分", example = "683.0")
        private BigDecimal currentScoreAssigned;
        
        @Schema(description = "目标赋分线", example = "685.0")
        private BigDecimal targetScoreAssigned;
    }

    /**
     * 升学趋势分析
     */
    @Data
    public static class AdmissionTrendAnalysis {
        @Schema(description = "历次考试升学预测变化")
        private List<AdmissionTrendPoint> trendPoints;

        @Schema(description = "整体趋势", example = "上升")
        private String overallTrend;

        @Schema(description = "变化幅度", example = "5.2")
        private BigDecimal changeRate;
    }

    /**
     * 升学趋势点
     */
    @Data
    public static class AdmissionTrendPoint {
        @Schema(description = "考试名称", example = "月考一")
        private String examName;

        @Schema(description = "考试时间", example = "2024-01-15")
        private LocalDateTime examDate;

        @Schema(description = "班级平均分", example = "615.5")
        private BigDecimal classAvgScore;

        @Schema(description = "一本预测上线率", example = "75.6")
        private BigDecimal firstTierRate;

        @Schema(description = "985预测上线率", example = "15.6")
        private BigDecimal rate985;

        @Schema(description = "211预测上线率", example = "31.1")
        private BigDecimal rate211;
    }

    /**
     * 学生排名信息
     */
    @Data
    public static class StudentRankingInfo {
        @Schema(description = "前10名学生")
        private List<TopStudentInfo> topStudents;

        @Schema(description = "进步最大学生")
        private List<ProgressStudentInfo> mostImprovedStudents;

        @Schema(description = "需要关注学生")
        private List<AttentionStudentInfo> attentionStudents;

        @Schema(description = "排名变化统计")
        private RankingChangeStats rankingChangeStats;
    }

    /**
     * 优秀学生信息
     */
    @Data
    public static class TopStudentInfo {
        @Schema(description = "学生ID", example = "1001")
        private Long studentId;

        @Schema(description = "学生姓名", example = "张三")
        private String studentName;

        @Schema(description = "学号", example = "G3C1001")
        private String studentNo;

        @Schema(description = "班级名称", example = "高三(1)班")
        private String className;

        @Schema(description = "总分", example = "684.5")
        private BigDecimal totalScore;

        @Schema(description = "班级排名", example = "1")
        private Integer classRank;

        @Schema(description = "年级排名", example = "2")
        private Integer gradeRank;

        @Schema(description = "预测升学层次", example = "985")
        private String predictedAdmissionLevel;

        @Schema(description = "目标院校", example = "清华大学")
        private String targetUniversity;
        
        @Schema(description = "选科组合", example = "物化生")
        private String subjectCombination;
        
        @Schema(description = "首选科目", example = "物理")
        private String firstSubject;
        
        @Schema(description = "再选科目", example = "化学,生物")
        private String secondSubject;
        
        @Schema(description = "考试类型", example = "物理类")
        private String examType;
        
        @Schema(description = "总分赋分", example = "690.5")
        private BigDecimal totalScoreAssigned;
        
        @Schema(description = "组合排名", example = "3")
        private Integer combinationRank;
        
        @Schema(description = "校内排名", example = "5")
        private Integer schoolRank;
        
        @Schema(description = "总分联考排名", example = "8")
        private Integer totalUnionRank;
        
        @Schema(description = "等效分", example = "685.5")
        private BigDecimal equivalentScore;
        
        @Schema(description = "等效位次", example = "1250")
        private Integer equivalentRank;
    }

    /**
     * 进步学生信息
     */
    @Data
    public static class ProgressStudentInfo {
        @Schema(description = "学生ID", example = "1002")
        private Long studentId;

        @Schema(description = "学生姓名", example = "李四")
        private String studentName;

        @Schema(description = "学号", example = "G3C1002")
        private String studentNo;

        @Schema(description = "当前总分", example = "650.0")
        private BigDecimal currentScore;

        @Schema(description = "上次总分", example = "620.0")
        private BigDecimal previousScore;

        @Schema(description = "进步分数", example = "30.0")
        private BigDecimal progressScore;

        @Schema(description = "排名提升", example = "8")
        private Integer rankImprovement;

        @Schema(description = "升学层次变化", example = "从二本提升到一本")
        private String admissionLevelChange;
        
        @Schema(description = "选科组合", example = "物化生")
        private String subjectCombination;
        
        @Schema(description = "考试类型", example = "物理类")
        private String examType;
        
        @Schema(description = "当前总分赋分", example = "655.5")
        private BigDecimal currentScoreAssigned;
        
        @Schema(description = "上次总分赋分", example = "625.0")
        private BigDecimal previousScoreAssigned;
    }

    /**
     * 关注学生信息
     */
    @Data
    public static class AttentionStudentInfo {
        @Schema(description = "学生ID", example = "1003")
        private Long studentId;

        @Schema(description = "学生姓名", example = "王五")
        private String studentName;

        @Schema(description = "学号", example = "G3C1003")
        private String studentNo;

        @Schema(description = "关注原因", example = "成绩下滑")
        private String attentionReason;

        @Schema(description = "当前总分", example = "580.0")
        private BigDecimal currentScore;

        @Schema(description = "分数变化", example = "-25.0")
        private BigDecimal scoreChange;

        @Schema(description = "排名变化", example = "-12")
        private Integer rankChange;

        @Schema(description = "建议措施", example = "加强数学辅导")
        private String suggestedAction;
        
        @Schema(description = "选科组合", example = "物化生")
        private String subjectCombination;
        
        @Schema(description = "考试类型", example = "物理类")
        private String examType;
        
        @Schema(description = "当前总分赋分", example = "585.0")
        private BigDecimal currentScoreAssigned;
        
        @Schema(description = "总分联考排名", example = "15")
        private Integer totalUnionRank;
    }

    /**
     * 排名变化统计
     */
    @Data
    public static class RankingChangeStats {
        @Schema(description = "排名上升人数", example = "18")
        private Integer rankUpCount;

        @Schema(description = "排名下降人数", example = "15")
        private Integer rankDownCount;

        @Schema(description = "排名不变人数", example = "12")
        private Integer rankSameCount;

        @Schema(description = "平均排名变化", example = "1.2")
        private BigDecimal avgRankChange;
    }

    /**
     * 教学效果分析
     */
    @Data
    public static class TeachingEffectAnalysis {
        @Schema(description = "提分效果")
        private ScoreImprovementEffect scoreImprovement;

        @Schema(description = "学科教学分析")
        private Map<String, SubjectTeachingAnalysis> subjectTeaching;

        @Schema(description = "目标达成分析")
        private TargetAchievementAnalysis targetAnalysis;
    }

    /**
     * 提分效果
     */
    @Data
    public static class ScoreImprovementEffect {
        @Schema(description = "班级平均分提升", example = "15.5")
        private BigDecimal avgScoreImprovement;

        @Schema(description = "提分人数", example = "32")
        private Integer improvedStudentCount;

        @Schema(description = "提分率", example = "71.1")
        private BigDecimal improvementRate;

        @Schema(description = "各分数段变化")
        private Map<String, Integer> scoreRangeChanges;
    }

    /**
     * 学科教学分析
     */
    @Data
    public static class SubjectTeachingAnalysis {
        @Schema(description = "科目名称", example = "数学")
        private String subjectName;

        @Schema(description = "教学效果评级", example = "优秀")
        private String teachingEffectLevel;

        @Schema(description = "平均分提升", example = "8.5")
        private BigDecimal avgScoreImprovement;

        @Schema(description = "在年级中的排名", example = "1")
        private Integer gradeRank;

        @Schema(description = "优势分析", example = "基础知识掌握扎实")
        private String strengths;

        @Schema(description = "改进建议", example = "加强应用题训练")
        private String improvements;
    }

    /**
     * 目标达成分析
     */
    @Data
    public static class TargetAchievementAnalysis {
        @Schema(description = "一本目标达成率", example = "97.2")
        private BigDecimal firstTierAchievementRate;

        @Schema(description = "985目标达成率", example = "80.0")
        private BigDecimal rate985AchievementRate;

        @Schema(description = "211目标达成率", example = "88.9")
        private BigDecimal rate211AchievementRate;

        @Schema(description = "整体目标评估", example = "目标基本达成")
        private String overallAssessment;
    }

    /**
     * 对比分析
     */
    @Data
    public static class ComparisonAnalysis {
        @Schema(description = "与其他班级对比")
        private ClassComparisonInfo classComparison;

        @Schema(description = "历史对比")
        private HistoricalComparisonInfo historicalComparison;

        @Schema(description = "科目对比")
        private Map<String, SubjectComparisonInfo> subjectComparison;
    }

    /**
     * 班级对比信息
     */
    @Data
    public static class ClassComparisonInfo {
        @Schema(description = "在年级中的排名", example = "2")
        private Integer gradeRank;

        @Schema(description = "年级班级总数", example = "8")
        private Integer totalClasses;

        @Schema(description = "平均分排名", example = "2")
        private Integer avgScoreRank;

        @Schema(description = "一本上线率排名", example = "1")
        private Integer firstTierRateRank;

        @Schema(description = "与第一名班级差距", example = "5.2")
        private BigDecimal gapToFirst;
    }

    /**
     * 历史对比信息
     */
    @Data
    public static class HistoricalComparisonInfo {
        @Schema(description = "与上次考试对比")
        private ExamComparisonInfo lastExamComparison;

        @Schema(description = "与去年同期对比")
        private ExamComparisonInfo lastYearComparison;

        @Schema(description = "整体趋势", example = "稳步上升")
        private String overallTrend;
    }

    /**
     * 考试对比信息
     */
    @Data
    public static class ExamComparisonInfo {
        @Schema(description = "平均分变化", example = "8.5")
        private BigDecimal avgScoreChange;

        @Schema(description = "排名变化", example = "1")
        private Integer rankChange;

        @Schema(description = "一本上线率变化", example = "5.6")
        private BigDecimal firstTierRateChange;

        @Schema(description = "变化趋势", example = "上升")
        private String changeTrend;
    }

    /**
     * 科目对比信息
     */
    @Data
    public static class SubjectComparisonInfo {
        @Schema(description = "科目名称", example = "数学")
        private String subjectName;

        @Schema(description = "在年级中的排名", example = "1")
        private Integer gradeRank;

        @Schema(description = "与年级平均分差值", example = "8.5")
        private BigDecimal gradeAvgDiff;

        @Schema(description = "优势程度", example = "显著优势")
        private String advantageLevel;
    }

    /**
     * 重点关注学生 - 教师需要特别关注的学生
     */
    @Data
    public static class FocusStudent {
        @Schema(description = "学生ID", example = "1001")
        private Long studentId;

        @Schema(description = "学生姓名", example = "张三")
        private String studentName;

        @Schema(description = "学号", example = "G3C1001")
        private String studentNo;

        @Schema(description = "关注类型", example = "临界985")
        private String focusType; // 临界985、临界211、临界一本、成绩下滑、进步显著

        @Schema(description = "当前总分", example = "678")
        private BigDecimal currentScore;

        @Schema(description = "目标分数", example = "680")
        private BigDecimal targetScore;

        @Schema(description = "分数差距", example = "2")
        private BigDecimal scoreDiff;

        @Schema(description = "班级排名", example = "3")
        private Integer classRank;

        @Schema(description = "年级排名", example = "8")
        private Integer gradeRank;

        @Schema(description = "关注原因", example = "距离985线仅差2分，有冲击可能")
        private String focusReason;

        @Schema(description = "建议措施", example = "加强数学薄弱环节")
        private String suggestion;

        @Schema(description = "选科组合", example = "物化生")
        private String subjectCombination;

        @Schema(description = "考试类型", example = "物理类")
        private String examType;
    }

    /**
     * 教学建议 - 基于数据分析的教学建议
     */
    @Data
    public static class TeachingSuggestion {
        @Schema(description = "建议类型", example = "科目提升")
        private String suggestionType; // 科目提升、学生关注、目标调整、教学策略

        @Schema(description = "优先级", example = "高")
        private String priority; // 高、中、低

        @Schema(description = "建议内容", example = "数学科目需要加强基础训练")
        private String content;

        @Schema(description = "涉及学生数", example = "12")
        private Integer affectedStudentCount;

        @Schema(description = "预期效果", example = "预计可提升班级平均分3-5分")
        private String expectedEffect;

        @Schema(description = "具体措施", example = "增加课后辅导时间，重点训练解题技巧")
        private String specificActions;
    }

    /**
     * 学生目标汇总
     */
    @Data
    public static class StudentGoalSummary {
        @Schema(description = "已设置目标人数", example = "40")
        private Integer totalStudentsWithGoals;

        @Schema(description = "未设置目标人数", example = "5")
        private Integer totalStudentsWithoutGoals;

        @Schema(description = "目标完成率（模拟）", example = "75.5")
        private BigDecimal goalCompletionRate;

        @Schema(description = "热门目标大学")
        private List<PopularUniversity> popularUniversities;

        @Schema(description = "热门目标专业")
        private List<PopularMajor> popularMajors;
    }

    /**
     * 热门目标大学
     */
    @Data
    public static class PopularUniversity {
        @Schema(description = "大学名称", example = "清华大学")
        private String universityName;

        @Schema(description = "目标人数", example = "5")
        private Integer count;
    }

    /**
     * 热门目标专业
     */
    @Data
    public static class PopularMajor {
        @Schema(description = "专业名称", example = "计算机科学与技术")
        private String majorName;

        @Schema(description = "目标人数", example = "12")
        private Integer count;
    }

    /**
     * 目标指标分析
     */
    @Data
    public static class GoalIndicatorAnalysis {
        @Schema(description = "平均目标分差（当前分 - 目标分）", example = "-50.5")
        private BigDecimal avgScoreGap;

        @Schema(description = "目标达成分布（安全/冲刺/稳妥）")
        private Map<String, Integer> goalStatusDistribution;

        @Schema(description = "目标难度系数", example = "0.8")
        private BigDecimal difficultyCoefficient;
    }
}
